﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using hou_elearning.Business;
using hou_elearning.Entity;

public partial class Controls_ucBaiviet : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    /// <summary>
    /// Hàm lấy ID slide từ query
    /// </summary>
    /// <author>liemqv</author>
    /// <create>25/05/2012</create>
    /// 
    public Int16 iGetFK_iSlideID()
    {
        Int16 iRes = 0;
        if (Request["id"] != null)
        {
            try
            {
                iRes = Int16.Parse(Request["id"].ToString());
            }
            catch (Exception ex)
            {

            }
        }
        return iRes;
    }
    /// <summary>
    /// Hàm hiện tin tức theo id
    /// </summary>
    /// <author>liemqv</author>
    /// <create>25/05/2012</create>
    /// <param name="PK_iTintucID">ID tin tức</param>
    ///
    public void hienTintuc(Int16 PK_iTintucID)
    {
        Int16 PK_iBaivietID = iGetFK_iSlideID();
        if (PK_iBaivietID > 0)
        {
            BaivietEntity oBaiviet = BaivietBRL.GetOne(PK_iBaivietID);
            if(oBaiviet != null)
            {
                divTintuc.InnerHtml = oBaiviet.sNoidung;
            }
        }
    }
}